.flex-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.arrow-up {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: var(--bus-width);
    $border-size: calc(var(--bus-width) / 2);

    &::before {
        content: '';
        display: block;
        border: 4px solid transparent;
        border-top-width: 0px;
        border-bottom: 8px solid;
        border-bottom-color: initial;
    }

    &::after {
        content: '';
        display: block;
        height: 100%;
        border-left: 1px solid;
    }
}

.arrow-right,
.arrow-left {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: var(--bus-width);
}

.arrow-right {
    &::after {
        content: '';
        display: block;
        border: 4px solid transparent;
        border-right-width: 0px;
        border-left: 8px solid;
        border-left-color: initial;
    }

    &::before {
        content: '';
        display: block;
        width: 100%;
        border-top: 1px solid;
    }
}

.arrow-left {
    &::before {
        content: '';
        display: block;
        border: 4px solid transparent;
        border-left-width: 0px;
        border-right: 8px solid;
        border-right-color: initial;
    }

    &::after {
        content: '';
        display: block;
        width: 100%;
        border-top: 1px solid;
    }
}

// 向上箭头容器
.to-top-arrows {
    @extend .flex-container;
    position: absolute;
    &.top {
        top: 0;
        transform: translateY(-100%);
    }
    &.bottom {
        bottom: 0;
        transform: translateY(100%);
    }

    .flex-container {
        flex-direction: column;
    }

    .arrow {
        height: 20px;

        &:nth-child(n + 2) {
            margin-left: 10px;
        }
    }
}

.psw .to-top-arrows .arrow {
    margin-left: 0;
}

// 向右向左箭头容器
.to-right-arrows,
.to-left-arrows {
    @extend .flex-container;
    align-items: flex-end;
    flex-direction: column;
    position: absolute;
    line-height: 14px;
    font-size: 15px;
    &.left {
        left: 0;
        transform: translateX(-100%);
        .arrow {
            width: 38px;
        }
    }
    &.right {
        right: 0;
        transform: translateX(100%);
        .arrow {
            width: 40px;
        }
    }
}

.to-left-arrows {
    align-items: flex-start;
}

// BUS容器
.bus-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

// 处理一些模块中输入输出的样式
.selector-items,
.au-inputs,
.reg-outputs {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
}

.au-inputs {
    position: absolute;
    bottom: 0;
}

.reg-outputs {
    position: absolute;
    top: 0;
}
